package aidturith.ihm.action.key;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import aidturith.ihm.panel.proto.TablePanel;

public class DownAction extends AbstractAction {

	private static final long serialVersionUID = 1L;

	private TablePanel panel;

	public DownAction(TablePanel panel) {
		this.panel = panel;
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		int row = panel.getTable().getSelectedRow();
		if(row < panel.getVisibleRowCount())
			panel.selectRow(row+1);
		if(panel.isEditing()) panel.getDelete_jb().setEnabled(true);
	}

}
